package com.creditease.cn.monitor.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import redis.clients.jedis.Jedis;

import com.creditease.cn.monitor.dao.redis.SlaveRedisNode;
import com.creditease.cn.monitor.service.StringService;

@Service
public class StringServiceImplt implements StringService{
	private Logger logger = LoggerFactory.getLogger(StringServiceImplt.class);
	@Autowired
	private SlaveRedisNode slaveRedisNode;
	
	public String getValue(String key) {
		logger.info("【redis管理】【字符串类型-获取值】 key:" + key);
		Jedis jedis = slaveRedisNode.getConnection();
		String value = jedis.get(key);
		logger.info("【redis管理】【字符串类型-获取值】 key:" + key + " value:" + value);
		return value;
	}

}
